﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "ICertificate" here, you must also update the reference to "ICertificate" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICertificate
    {
        [OperationContract]
        DataSet Certificate_GetAll();

        [OperationContract]
        CertificateInfo Certificate_GetInfo(int CertificateID);

        [OperationContract]
        DataSet Certificate_GetList( out int ItemCount,int currentPage, int pageSize);

        [OperationContract]
        DataSet Certificate_GetWithEmployee(int EmployeeID);

        [OperationContract]
        DataSet Certificate_GetReport(int EmployeeID);

        [OperationContract]
        int Certificate_Insert(CertificateInfo eInfo);

        [OperationContract]
        bool Certificate_Update(CertificateInfo eInfo);

        [OperationContract]
        bool Certificate_UpdateEmployee(int EmployeeID);

        [OperationContract]
        bool Certificate_Delete(int CertificateID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class CertificateInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        string _AuthorityIssue;
        [DataMember]
        public string AuthorityIssue
        {
            get { return _AuthorityIssue; }
            set { _AuthorityIssue = value; }
        }

        DateTime _IssueDate;
        [DataMember]
        public DateTime IssueDate
        {
            get { return _IssueDate; }
            set { _IssueDate = value; }
        }

        string _Grade;
        [DataMember]
        public string Grade
        {
            get { return _Grade; }
            set { _Grade = value; }
        }

        string _Speciality;
        [DataMember]
        public string Speciality
        {
            get { return _Speciality; }
            set { _Speciality = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

        string _Kind;
        [DataMember]
        public string Kind
        {
            get { return _Kind; }
            set { _Kind = value; }
        }
    }
}

